package homework1;

import java.util.LinkedList;

public class MyStack {
	LinkedList list = new LinkedList();

	public void push(Object o) {
		list.add(o);

	}

	public Object pop() {
		list.getFirst();
		list.removeFirst();
		if (list.isEmpty() == true) {
			return null;
		}
		return list;
	}

	public Object peek() {
		list.getFirst();
		if (list.isEmpty() == true) {
			return null;
		}
		return list;
	}

	public boolean isEmpty() {
		return list.isEmpty();
	}

	public int size() {
		return list.size();
	}
}
